<!--
<div class = "side_bar">
	<div class = "login_div">
		<input type = "text" name = "username" id = "username" placeholder = "用户名" />
		<br />
		<input type = "password" name = "password" id = "password" placeholder = "密码"/>
		<input type = "button" name = "login_bt" value = "登陆" name = "login_bt" />
		<input type = "button" name = "reg_bt" value = "注册" name = "reg_bt" />
	</div>
 
	<ul>
		<li><a href = "index.php">首页</a></li>
		<li><a href = "#">全站十大</a></li>
		<li><a href = "#">各区热点</a></li>
		<li><a href = "#">我的版面</a></li>
		<li><a href = "#">我的收藏</a></li>
		<li><a href = "#">站内信</a></li>
		<li><a href = "#">搜索</a></li>
	</ul>
</div>
-->
<?php @session_start(); ?>
<div class = "side_bar">
	<?php
		if(!isset($_SESSION["current_user"])) {
	?>
		<div class = "login_div">
		<form class = "login_form" action = "login_save.php" method = "post" name = "login_form" onsubmit="return check_login_name(this);" >
		<input type = "text" name = "username" id = "username" placeholder = "用户名" />
		<br />
		<input type = "password" name = "password" id = "password" placeholder = "密码"/>
		<input type = "submit" name = "login_bt" value = "登陆" id = "login_bt" onclick="check_login_name(login_form)" />
		<a href = "reg2.php" class = "tips_reg">注册</a>
		</form>
		</div>

	<?php
		}
		else {		
	?>
		<div class = "logined">
		<p><strong><?php echo $_SESSION["current_user"]; ?></strong>,欢迎回来!</p>
		<p>这是您第<strong><?php echo $_SESSION["login_count"]; ?></strong>次登录</p>
		<p class = "last_login_time">您上次登录时间是：<p class="last_login_time"><?php echo $_SESSION["lastlogintime"]; ?></p></p>
		<p><a href = "personal.php">修改资料</a>&nbsp<a href = "logout.php" id = "logout">退出</a></p>
		</div>
	<?php  } ?>
 
	<ul>
		<li><a href = "index.php">首页</a></li>
		<li><a href = "top_ten.php">全站十大</a></li>
		<li><a href = "#">各区热点</a></li>
		<li><a href = "#">我的版面</a></li>
		<li><a href = "#">我的收藏</a></li>
		<li><a href = "#">站内信</a></li>
		<li><a href = "#">搜索</a></li>
	</ul>
</div>
